#include <iostream>
#include <string>
using namespace std;

const int N = 128;

int main()
{
	char cstr1[N], cstr2[N];
	cin>>cstr1;
	cin>>cstr2;

	bool bEqual = true;
	for(int i=0; (cstr1[i]!='\0') || (cstr2[i]!='\0'); i++)
    {
		if(cstr1[i]!=cstr2[i])
        {
			bEqual = false;
			break;
		}
	}
	if (bEqual)
        cout << "Equal" << endl;
    else
        cout << "Not equal" << endl;

	string cppstr1, cppstr2;
	cin >> cppstr1;
	cin >> cppstr2;
	if (cppstr1==cppstr2)
        cout << "Equal" << endl;
    else
        cout << "Not equal" << endl;

    return 0;
}




